package lesson

import (
	"github.com/gogf/gf/v2/frame/g"
	"server/internal/model"
)

type CategoryCreateReq struct {
	g.Meta   `path:"/lesson/category/create" tags:"教学模块-课程分类" method:"post" summary:"新增" description:"新增分类"`
	ParentId int64  `v:"" dc:"上级ID"`
	Name     string `v:"required"`
	Code     string `v:"required"`
	Cover    string `v:""`
	Remark   string `v:""`
}
type CategoryCreateRes struct {
	ID int64 `json:"id"`
}

type CategoryUpdateReq struct {
	g.Meta   `path:"/lesson/category/update" tags:"教学模块-课程分类" method:"post" summary:"编辑" description:"编辑分类"`
	ID       int64  `v:"required"`
	ParentId int64  `v:"" dc:"上级ID"`
	Name     string `v:"required"`
	Code     string `v:"required"`
	Cover    string `v:""`
	Remark   string `v:""`
}
type CategoryUpdateRes struct {
	Result int64 `json:"result"`
}

type CategoryDeleteReq struct {
	g.Meta `path:"/lesson/category/delete" tags:"教学模块-课程分类" method:"post" summary:"删除" description:"删除分类"`
	ID     int64 `v:"required"`
}
type CategoryDeleteRes struct {
	Result int64 `json:"result"`
}

type CategoryListReq struct {
	g.Meta `path:"/lesson/category/list" tags:"教学模块-课程分类" method:"GET" summary:"列表" description:"配置项列表"`
}
type CategoryListRes struct {
	Data []model.LessonCategoryListItem `json:"data"`
}
